package controllers

import (
	"git.oschina.net/tinkler/for_kmjxc/models/km"
)

// Operation 价格
type PriceController struct {
	HelperController
}

// @Title discont sale price
// @Description 通过【促销计划】单号获取特价列表
// @Param sheetNo path string true "单号"
// @Success 200 {object} models.km.PmTPriceFlowDetailItem
// @Failure 403 body is empty
// @router /special/:sheetNo [get]
func (p *PriceController) GetSpecial() {
	sheetNo := p.GetString(":sheetNo")
	if ptfdis, err := km.GetPmTPriceFlowDetailItemsBySheetNo(sheetNo); err == nil {
		p.Data[`json`] = ptfdis
	} else {
		panic(err)
	}
	p.ServeAPI()
}
